

import 'package:flutter/material.dart';
import 'package:rms_mobile_client/Localizations/Localization.dart';
import 'package:rms_mobile_client/UI/Pages/UserCenterPage.dart';

class MainPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _MainPageState();
  }

}

class _MainPageState extends State<MainPage> with SingleTickerProviderStateMixin {
	TabController _tabController;

	@override
  void initState() {
    _tabController = TabController(vsync: this, length: 3, initialIndex: 1);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    var lang = Localization.of(context).language;
    return Directionality(
			textDirection: lang.textDirection,
			child: Scaffold(
				appBar: AppBar(
					title: Text(lang.strings.welcome, style: TextStyle(fontFamily: lang.titleFontName),),
					centerTitle: true,
				),
				body: Column(
					children: <Widget>[
						Expanded(
							child: TabBarView(
								controller: _tabController,
								children: <Widget>[
									Container(color: Colors.black12, margin: EdgeInsets.all(5.0),),
									Container(color: Colors.black12, margin: EdgeInsets.all(5.0),),
									UserCenterPage(),
								],
							),
						),
						TabBar(
							controller: _tabController,
							labelColor: Theme.of(context).primaryColor,
							unselectedLabelColor: Colors.black45,
							tabs: <Widget>[
								Column(
									children: <Widget>[
										Icon(Icons.airplanemode_active),
										Text("ھەركەتلەر"),
									],
								),
								Column(
									children: <Widget>[
										Icon(Icons.apps),
										Text("باش بەت"),
									],
								),
								Column(
									children: <Widget>[
										Icon(Icons.person),
										Text("مەن"),
									],
								),
							],
						)
					],
				)
			)
		);
  }
}
